package cn.getech.data.development.constant;

import lombok.Getter;

@Getter
public enum SapDataType {

    NUM(1 , "num" ),
    CHAR(2 , "char" ),
    DATE(3 , "date" );

    private  int id;
    private  String  name;
    private static final int types = 3;

    SapDataType(int id , String  name){
        this.id = id;
        this.name = name;
    }

    public static SapDataType ObjOf(Integer status) {
        if (status == null) {
            return null;
        } else {
            for (SapDataType s : SapDataType.values()) {
                if (s.getId() == status) {
                    return s;
                }
            }
            return null;
        }
    }
}
